Aspect-Oriented Programming in the Design of Computer Algebra Libraries
نویسنده
چکیده
During the past five years, the Java programming language has been steadily gaining ground against C++, and older, structured languages. Its major strengths are portability, strong typing, and built-in support of networking, threading, and distributed computation. Most often, poor performance, lack of operator overloading, and limitations in sub-classing, are cited as weak points of Java. With the introduction of “generics” in the next major release, Java will add its own version of templates. The suitability for symbolic and algebraic computation has been discussed in [4], with respect to general features of the language, and in [7] with a special focus on run-time performance. The “Meditor” project [6] started out as a text editor that could process in-line mathematical expressions, and generate MathML output. Over time, it evolved into a small, yet impressive computer algebra system, entirely implemented in Java. It includes versions for handheld computer architectures. Industry analysts predict that by 2006, 60% of applications for mobile devices will be built in Java. Aspect-Oriented Programming (AOP) was originally conceived as a “post-” Object-Oriented Programming (OOP) method. However, AOP does not mean to replace OOP, it tries to complement it. As the introduction to [8] notes: “While the tendency in OOP is to find commonality among classes and push it up in the inheritance tree, AOP attempts to realize scattered concerns as first-class elements, and eject them horizontally from the object structure.” Indeed, “separation of concerns,” cross-cutting, and weaving are the main themes of AOP. Aspects add a third dimension to Java, where classes and interfaces constitute OOP elements. By defining “join points,” aspects can attach to data fields and/or methods, without jeopardizing OOP type checking. The most mature AOP library for Java is AspectJ [2]. We propose to employ AOP at several points in the design of Computer Algebra Systems (CAS). AOP can be used to decrease the amount of duplicated code, to check for special cases in a non-intrusive manner, and might even improve the performance of the system. A simple example would be the enforcement of domain-specific rules (e.g., for “add” methods that reside in disparate sub-classes). Using the additional “degree of freedom,” more elaborate type systems (e.g., in the spirit of AXIOM) can be built. In particular, aspects could be used to define algebraic structures over data types that are defined by Java classes, while interfaces would provide for restriction and/or composition. Our samples take ideas from the design of the GiNaC system [3], and the Java code of [6].
منابع مشابه
A System of Patterns for Reusable Aspect Libraries
A key direction for achieving mainstream adoption of aspectoriented (AO) programming is the availability of reusable aspect libraries that can be easily applied across a wide range of applications. This paper presents a pattern system for AO design that provides solutions for recurring problems in the design of such reusable aspect libraries. We have focused on libraries using AspectJ. The requ...
متن کاملMethod integration: An approach to develop agent oriented methodologies
Agent oriented software engineering (AOSE) is an emerging field in computer science and proposes some systematic ideas for multi agent systems analysis, implementation and maintenance. Despite the various methodologies introduced in the agent-oriented software engineering, the main challenges are defects in different aspects of methodologies. According to the defects resulted from weaknesses ...
متن کاملDeclarative Semantics in Object-Oriented Software Development - A Taxonomy and Survey
One of the modern paradigms to develop an application is object oriented analysis and design. In this paradigm, there are several objects and each object plays some specific roles in applications. In an application, we must distinguish between procedural semantics and declarative semantics for their implementation in a specific programming language. For the procedural semantics, we can write a ...
متن کاملDesign of a Parallel Object-Oriented Linear Algebra Library
Scientific programmers are eager to exploit the computational power offered by Distributed Memory Parallel Computers (DMPCs), but are generally reluctant to undertake the manual porting of their application programs onto such machines. A possible solution to this problem consists in using libraries that hide the details of parallel computations. We show how to go one step beyond, using the full...
متن کاملProcess-Algebraic Foundations of Aspect-Oriented Programming
Process algebras are proposed as a foundation for aspectoriented programming. A particular process algebra is described, and programs illustrating its use in programming are given. It is argued that the framework clarifies the notion of equivalence between programs and correctness of aspect-weaving algorithms. The question of which notion of equivalence is most appropriate is discussed from the...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2004